﻿using AdvVerifyModels.Models.Requests.SubstrateTracking;
using AdvVerifyModels.Models.Responses.SubstrateTracking;
using Refit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AdvVerifyModels.Clients
{
    public interface IWaferServiceClient
    {
        [Post("/reset")]
        Task Reset();

        [Post("/track")]
        Task<SubstrateTrackingResult> Track();

        [Post("/open_foup/{foup}")]
        Task<WaferServiceResponse> OpenFoup(int foup);

        [Post("/close_foup/{foup}")]
        Task<WaferServiceResponse> CloseFoup(int foup);

        [Post("/load_wafer")]
        Task<WaferServiceResponse> Load(WaferTransferRequest req);

        [Post("/unload_wafer")]
        Task<WaferServiceResponse> Unload(WaferTransferRequest req);

        [Post("/queue")]
        Task<WaferServiceResponse> LoadAll(WaferLoadingQueueRequest req);

        [Post("/queue/{id}/unload")]
        Task QueueUnload(Guid id);

        [Post("/queue/{id}/health_check")]
        Task QueueHealthCheck(Guid id, CancellationToken tok);

        [Post("/queue/{id}/request_completion")]
        Task QueueRequestCompletion(Guid id);

        [Post("/queue/{id}/cancel")]
        Task QueueCancel(Guid id);

        [Get("/aligner_angle")]
        Task<AlignerAngleResponse> GetAlignerAngle();

        [Post("/aligner_angle")]
        Task SetAlignerAngle(AlignerAngleRequest req);

        [Post("/load_to_loadlock")]
        Task<WaferServiceResponse> LoadToLoadLock(WaferTransferRequest req);

        [Post("/unload_from_loadlock")]
        Task<WaferServiceResponse> UnloadFromLoadLock(WaferTransferRequest req);

        [Post("/auto_exit_wafer")]
        Task<WaferServiceResponse> AutoExitWafer(ExitWaferRequest req);

        [Post("/rechuck_wafer")]
        Task<WaferServiceResponse> ReChuckWafer();

        [Post("/create_wafer")]
        Task<WaferServiceResponse> CreateWafer(OperateWaferRequest req);

        [Post("/delete_wafer")]
        Task<WaferServiceResponse> DeleteWafer(OperateWaferRequest req);

        [Post("/set_location")]
        Task<WaferServiceResponse> SetLocation(OperateWaferRequest req);

        [Post("/modify_wafer")]
        Task<WaferServiceResponse> ModifyWafer(ModifyWaferRequest req);

        [Post("/refresh")]
        Task<WaferServiceResponse> Refresh();
    }
}
